// head头部js
$(function(){
	$('.logclick').live('click', function(){
		layer.closeAll();
		var login =  $.layer({
			type: 1,
			shade: [0.8, '#000'],
			area: ['auto', 'auto'],
			title: false,
			border: [0],
			shift: 'top',
			page: {dom : '#loginbox'}
		});
		
	});
	$('.regclick').live('click', function(){
		layer.closeAll();
		var register =  $.layer({
			type: 1,
			shade: [0.8, '#000'],
			area: ['auto', 'auto'],
			title: false,
			border: [0],
			shift: 'top',
			page: {dom : '#regbox'}

		});
	});
	$(".loginform").Validform({
		tiptype:function(msg,o,cssctl){
			var objtip=$("#loginnotice");
			cssctl(objtip,o.type);
			objtip.text(msg);
		}
	});
	$(".regform").Validform({
		tiptype:function(msg,o,cssctl){
			var objtip=$("#regnotice");
			cssctl(objtip,o.type);
			objtip.text(msg);
		}
	});
	$("input[name='mobilephone']").live('focusin', function(){
		$(this).siblings('span').html("");
	});
	$("input[name='mobilephone']").focusout(function() {
		if($(this).val()==""){
			$(this).siblings('span').html("手机号");
		}
	});
	$("input[name='password']").live('focusin', function(){
		$(this).siblings('span').html("");
	});
	$("input[name='password']").focusout(function() {
		if($(this).val()==""){
			$(this).siblings('span').html("密码");
		}
	});
})